#include "Mesh.h"
#include <vector>
using namespace std;


Mesh::Mesh( IDirect3DVertexBuffer9* vb, IDirect3DIndexBuffer9* ib, IDirect3DVertexDeclaration9 *vdecl, Material *mtrl, UINT stride,OBB &obb, UINT vCount, UINT trCount )
	:vertexBuffer(vb), indexBuffer(ib), vdecl(vdecl), mtrl(mtrl), obb(obb), vbStride(stride), vertCount(vCount), trisCount(trCount)
{
}

IDirect3DVertexBuffer9 *Mesh::GetVertexBuffer()
{
	return vertexBuffer;
}
IDirect3DIndexBuffer9 *Mesh::GetIndexBuffer()
{
	return indexBuffer;
}

IDirect3DVertexDeclaration9 *Mesh::GetVertexDeclaration()
{
	return vdecl;
}
UINT Mesh::CountVertices()
{
	return vertCount;
}
UINT Mesh::CountTriangles()
{
	return trisCount;
}
UINT Mesh::GetVertexStride()
{
	return vbStride;
}

Material *Mesh::GetMaterial()
{
	return mtrl;
}